package cn.javass.dp.builder.example3;


import java.util.Collection;
import java.util.Map;

/**
 * 指导使用构建起的接口来构建产品对象
 */
public class Director {

    /**
     * 构建起对象
     */
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    /**
     * 构建最终的产品对象
     */
    public void construct(ExportHeaderModel ehm, Map<String, Collection<ExportDataModel>> mapData, ExportFooterModel efm) {
        builder.buildHeader(ehm);
        builder.buildBody(mapData);
        builder.buildFooter(efm);
    }
}
